import request from '@/utils/request'

/**
* 新增
*/
export function add${entity}(params) {
  return request({
    url: '/${cfg.entityName}/save',
    method: 'post',
    data: params
  })
}

/**
* 删除
*/
export function delete${entity}(param) {
  return request({
    url: '/${cfg.entityName}/batchDelete',
    method: 'post',
    data: param,
  })
}

/**
* 修改
*/
export function update${entity}(params) {
  return request({
    url: '/${cfg.entityName}/update',
    method: 'post',
    data: params
  })
}

/**
* 查询数据（分页）
*/
export function get${entity}TableData(params) {
  return request({
    url: '/${cfg.entityName}/pagelist',
    method: 'post',
    data: params
  })
}

/**
* 查询数据（不分页）
*/
export function get${entity}List() {
  return request({
    url: '/${cfg.entityName}/list',
    method: 'get',
  })
}

/**
* 根据主键ID获取详情
*/
export function getDataById(params) {
  return request({
    url: '/${cfg.entityName}/getDataById/' + params,
    method: 'get',
  })
}

